//
//  ViewController.m
//  弹框
//
//  Created by xalo on 16/7/1.
//  Copyright © 2016年 liutuo. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
}

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
    
    UIView *view = [[UIView alloc]initWithFrame:CGRectMake(40, 600/2 - 40,  80, 80)];
    
    view.backgroundColor = [UIColor blackColor];
    
    view.layer.masksToBounds = YES;
    
    view.layer.cornerRadius = 8.0f;
    
    UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, view.bounds.size.width, 80)];
    
    label.numberOfLines = 3;
    
    label.text = @" 您的信息已经重新提交，我们正在在加紧审核，请稍侯 ";
    
    label.textColor = [UIColor whiteColor];
    
    label.textAlignment = NSTextAlignmentCenter;
    [view addSubview:label];
    [self.view addSubview:view];
    
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)),dispatch_get_main_queue(), ^{
        
        //2秒以后移除view
        
        [view removeFromSuperview];
        
    });
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
